home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install WhatsRelated 1.0 (28.10.98)
- ; Installer script by WHMP (for Changemodes), stolen and modified by Martin Blom
- ; Description: Installer script for WhatsRelated ARexx script
-
- (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
- (set awv 3)
- (set awr 1)
- (set #needInst43 "You must use Installer version 43 or greater. Use the Installer program from your AWeb-II disk.")
- (if (< (/ @installer-version 65536) 43)
- (abort #needInst43)
- )
-
- (set #installing "Installing ")
- ; offer to back up a file or drawer
- (procedure bumprev #bumpfile #bumptxt
- (if (exists #bumpfile)
- (
- (set bump 1)
- (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
- (if
- (askbool
- (default 1)
- (prompt (cat "\n\n\nBackup " #bumpfile " as "
- #bumpfile "_old" bump " ?\n\n\n "
- #bumptxt ) )
- (help
- (cat "\n\n\n\"" #bumpfile "\" is about to be over written.\n"
- "\nYou are being given the chance to back it up."
- " If you are unsure select yes... just in case ;-D ."
- )
- )
- )
- ; (rename #bumpfile (cat #bumpfile "_old" bump))
- ( (set bdest (cat #bumpfile "_old" bump))
- (copyfiles
- (source #bumpfile)
- (dest bdest)
- (all)
- )
- )
- )
- )
- )
- )
-
- ;add a line to a settings file
-
- (procedure addpref #preffile #preftext
- (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
- (
- (if (= @each-type 2)
- (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext "\"") )
- )
- )
- )
- (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext "\"") )
- )
-
- (set #no-aweb-ii
- (cat "You must have completed the AWeb-II 3.1 installation before "
- "you can install the %s plug-in. No AWeb3: assign has been found."
- )
- )
- (if (not (exists "AWeb3:" (noreq)))
- (abort (#no-aweb-ii "Utilities"))
- )
-
- (set @default-dest "AWeb3:")
- (bumprev "envarc:aweb3"
- (cat "Your previously SAVED AWeb 3.1 configuration"
- " is in this directory.")
- ) ; backup any previous AWeb3 prefs
-
- (set menbut
- (askoptions
- (prompt
- "\n\nInstall What's Related as\n"
- )
- (help "\nThe GUI buttons appear on the main AWeb window"
- "\nThe ARexx menu is attached to the main AWeb window\n"
- "The image popup menu is used to play with individual images from Web pages\n"
- "GUI buttons are only available with \n"
- "settings-GUI-options-show user buttons on\n")
- (choices "A GUI Button"
- "An ARexx Menu Entry"
- ""
- "A Keyboard Shortcut of \"<ALT>W\"" )
- (default 5)
- )
- )
- (if(bitand 1 menbut)
- (addpref "gui" "UBUT What's RelatedRUN AWeb3:Plugins/WhatsRelated.awebrx")
- )
- (if(bitand 2 menbut)
- (addpref "gui" "AREX 0;AWeb3:Plugins/WhatsRelated.awebrx;What's Related")
- )
- (if(bitand 8 menbut)
- (addpref "gui" "UKEY 0357 RUN AWeb3:Plugins/WhatsRelated.awebrx")
- )
- (copyfiles
- (source "WhatsRelated.awebrx")
- (dest (tackon @default-dest "Plugins"))
- (prompt #installing "What's Related")
- )
-
-
- (if (= @user-level 2)
- ( bumprev "env:aweb3"
- (cat "Your previous ACTIVE AWeb 3.1 configuration"
- " is in this directory.")
- ) ;backup any active prefs
- )
-
- (delete "env:aweb3/#?" (all))
-
- (copyfiles
- (source "ENVARC:AWeb3")
- (dest "ENV:AWeb3")
- (all)
- )
-
-
- (complete 100)
- (set @default-dest "AWeb3:Plugins")
-
-
- (exit "\n\n" @app-name
- " is now installed.\n\n"
- "If this is an update instalation be sure to check your GUI "
- " settings for duplicate entries."
- "\n"
- )
-
-